<#include "/common/head.ftl">

<html>

<head>

<title>Monthly Class Report ${month}/${year}</title>
	
<style>

table.nameTable {
	empty-cells:show;
	border-top: 1px solid black;
	border-right: 1px solid black;
}

table.nameTable tr {
	
}

table.nameTable tr td {
	border-left: 1px solid black;
	border-bottom: 1px solid black;
}

</style>
	
</head>

<body style="padding:0cm">

<div style="width:29.5cm;text-align:left;margin:0cm;padding:0px">

<h2 style="text-align:center;padding-top:0cm;margin:0cm">TIMETABLE FOR NEW CLASSES IN ${i18n.getMessage('month.long.' + month)} ${year}</h2>

<table class="nameTable" style="width:28cm;margin-left:0cm;padding:0cm" cellspacing="0" cellpadding=0">
	<tr style="text-align:center;font-weight:bold">
		<td style="background-color:F0FFF0">No.</td>
		<td style="background-color:F0FFF0">New Class</td>
		<td style="background-color:F0FFF0">Day/Time</td>
		<td style="background-color:F0FFF0">Start Date</td>
		<td style="background-color:F0FFF0">End Date</td>
		<td style="background-color:F0FFF0">Room</td>
		<td style="background-color:F0FFF0">Instructors</td>
		<td style="background-color:F0FFF0">Start Date <br/> for Instructors</td>
		<td style="background-color:F0FFF0">Textbook</td>
	</tr>
	<#list offerings as offering>
		<tr>
			<td style="width:0.7cm;text-align:center">${offering_index + 1}</td>
			<td style="width:2cm;border-right:0cm">${offering.name}</td>
			<td style="width:2.5cm;text-align:center">${(offering.shift.startTime?time)!}-${(offering.shift.endTime?time)!}</td>
			<td style="width:2.5cm;text-align:center">${((offering.startDate)?date)!}</td>
			<td style="width:2.5cm;text-align:center">${((offering.endDate)?date)!}</td>
			<td style="width:2cm;text-align:center">${(offering.room.code)!}</td>
			<td>
				<table border="0" cellspacing="0" cellpadding="0" style="width:4cm">
					<#list offering.instructors as teacher>
						<tr>
							<td>
								${teacher.firstName}
								<#assign daysOfTeacher = offering.getInitialDaysOfTeacher(teacher)>
								(<#list daysOfTeacher as day>${i18n.getMessage('day.short.' + day)}<#if (day_index!=daysOfTeacher.size()-1)>, </#if></#list>)
							</td>
						</tr>
					</#list>
				</table>
			</td>
			<td>
				<table border="0" cellspacing="0" cellpadding="0" style="width:100%">
					<#list offering.instructors as teacher>
						<tr>
							<td style="text-align:center">
								${(offering.getInitialFirstDayOfTeacher(teacher)?string(i18n.getMessage('format.shortDate')))!'&nbsp'}
							</td>
						</tr>
					</#list>
				</table>
			</td>
			<td>${(offering.level.content)!}</td>
		</tr>
	</#list>
</table>

</div>

</body>
</html>